#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
int missingNumber(int* nums, int numsSize) 
{
    int add = 0;
    int sum = (1 + numsSize) * numsSize / 2;
    int i = 0;
    for (i = 0; i < numsSize; i++)
    {
        add += nums[i];
    }
    return sum - add;;
}
int main()
{
    int len = 0;
    int i = 0;
    scanf("%d", &len);
    int* arr = (int*)malloc(sizeof(int) * len);
    for (i = 0; i < len; i++)
    {
        scanf("%d", &arr[i]);
    }
    int ret = missingNumber(arr, len);
    printf("%d", ret);
    return 0;
}